export default ()=> {
    let myChart = echarts.init(document.getElementById('barChart'));

        const option = {
            color: ['#3398DB'],
            tooltip : {
                trigger: 'axis',
                axisPointer : {            // 坐标轴指示器，坐标轴触发有效
                    type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                }
            },
            grid: {
                left: '0',
                right: '0',
                bottom: '3%',
                top:'10%',
                containLabel: true
            },
            xAxis : [
                {
                    type : 'category',
                    data : ['按时', '提前', '应到\n未到', '延期', '免预约'],
                    axisTick: {
                        alignWithLabel: true
                    },
                    axisLabel: {
                        textStyle:{
                            color: 'rgb(102, 102, 102)',
                            fontWeight:'normal',
                            fontSize: 12,
                            fontFamily:"Microsoft YaHei"
                        },
                        // showMaxLabel: true,
                        // showMinLabel: true,
                        // rotate: -45,
                    },
                }
            ],
            yAxis : [
                {
                    type : 'value',
                    interval: 20,
                    axisLabel: {
                        textStyle:{
                            color: 'rgb(102, 102, 102)',
                            fontWeight:'100',
                            fontFamily:'Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",Arial,sans-serif;'
                        }
                    },
                }
            ],
            series : [
                {
                    name:'车辆情况',
                    type:'bar',
                    barWidth: '60%',
                    itemStyle: {
                        normal: {
                            color: 'rgb(53,167,255)'
                        }
                    },
                    data:[60, 21, 14, 20, 9]
                }
            ]
        };

        myChart.setOption(option);
        window.onresize = myChart.resize;
}